# Unit testing: http://search.cpan.org/~mschwern/Test-Simple-0.98/lib/Test/More.pm

# perl sucks
# http://stackoverflow.com/questions/2526804/how-is-perls-inc-constructed-aka-what-are-all-the-ways-of-affecting-where-pe

use lib  "../app";
use Helpers::DBTest;
use Model::Document;

use DBX;


use Test::More tests => 3;


our @ISA = qw(Helpers::DBTest);

#----------
 
Helpers::DBTest->setup();


my $doc = new Model::Document(1, "hallo");
my $expected = "[document: id => 1, title => 'hallo']";
my $actual = $doc->to_string();
ok($expected eq $doc->to_string(), "to_string expected: expected <$expected, actual: <$actual>");


$doc = new Model::Document(1, "hallo");
$doc->create();
pass("create");

$doc = Model::Document->find(1);
pass("find");

